//
//  SEGOrderTrackChildModel.m
//  Uhomebk
//
//  Created by mac on 2017/10/9.
//  Copyright © 2017年 mac. All rights reserved.
//

#import "SEGOrderTrackChildModel.h"

@implementation SEGOrderTrackChildModel

@end

#pragma mark - ================<1.工单轨迹子模型 - 当前处理人>===============
@implementation SEGOrderCurrentUser
- (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    self = [super init];
    if (self) {
        _userId = @"";
        _userType = @"";
        _userName = @"";
        
        [self setValuesForKeysWithDictionary:dictionary];
        self.mDictionary = [[NSMutableDictionary alloc] initWithDictionary:dictionary];
        
    }
    return self;
}

+ (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    return [[self alloc] initWithDictionary:dictionary];
}

-(void)setUserId:(NSString *)userId
{
    _userId = [SEGUtils ValueToString:userId] ;
}

-(void)setUserType:(NSString *)userType
{
    _userType = [SEGUtils ValueToString:userType];
}

-(void)setUserName:(NSString *)userName
{
    _userName = [SEGUtils ValueToString:userName];
}

- (void)setValue:(id)value forUndefinedKey:(NSString*)key
{//注意此方法
}
@end


#pragma mark - ================<3.工单轨迹子模型 - 物料信息>===============
@implementation SEGOrderMateriels
+ (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    return [[self alloc] initWithDictionary:dictionary];
}

- (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    self = [super init];
    if (self) {
        _goodsName = @"";
        _goodsBrand = @"";
        _goodsModel = @"";
        _price = @"";
        _useCount = @"";
        _verificationType = @"";
        
        [self setValuesForKeysWithDictionary:dictionary];
        
        self.mDictionary = [[NSMutableDictionary alloc] initWithDictionary:dictionary];
        
    }
    return self;
}
- (void)setValue:(id)value forUndefinedKey:(NSString*)key
{//注意此方法
}

-(void)setGoodsName:(NSString *)goodsName
{
    _goodsName = [SEGUtils ValueToString:goodsName];
}

-(void)setGoodsBrand:(NSString *)goodsBrand
{
    _goodsBrand = [SEGUtils ValueToString:goodsBrand];
}

-(void)setGoodsModel:(NSString *)goodsModel
{
    _goodsModel = [SEGUtils ValueToString:goodsModel];
}

-(void)setPrice:(NSString *)price
{
    _price = [SEGUtils ValueToString:price];
}

-(void)setUseCount:(NSString *)useCount
{
    _useCount = [SEGUtils ValueToString:useCount];
}
-(void)setVerificationType:(NSString *)verificationType
{
    _verificationType = [SEGUtils ValueToString:verificationType];
}

@end

#pragma mark - ================<4.工单轨迹子模型 - 有偿服务>===============
@implementation SEGOrderPayServices
+ (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    return [[self alloc] initWithDictionary:dictionary];
}

- (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    self = [super init];
    if (self) {
        _serviceName = @"";
        _pirce = @"";
        
        [self setValuesForKeysWithDictionary:dictionary];
        
        self.mDictionary = [[NSMutableDictionary alloc] initWithDictionary:dictionary];
        
    }
    return self;
}

-(void)setServiceName:(NSString *)serviceName
{
    _serviceName = [SEGUtils ValueToString:serviceName];
}

- (void)setValue:(id)value forUndefinedKey:(NSString*)key
{//注意此方法
}

-(void)setPirce:(NSString *)pirce
{
    _pirce = [SEGUtils ValueToString:pirce];
}

@end

#pragma mark - ================<5.工单轨迹子模型 - 环节加急信息>===============
@implementation SEGOrderTaskUrgentInfo
+ (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    return [[self alloc] initWithDictionary:dictionary];
}

- (void)setValue:(id)value forUndefinedKey:(NSString*)key
{//注意此方法
}

- (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    self = [super init];
    if (self) {
        _userId = @"";
        _userName = @"";
        _userType = @"";
        _createTime = @"";
        _discussion = @"";
        self.mDictionary = [[NSMutableDictionary alloc] initWithDictionary:dictionary];
        [self setValuesForKeysWithDictionary:dictionary];

    }
    return self;
}
-(void)setUserId:(NSString *)userId{
    _userId = [SEGUtils ValueToString:userId];
}
-(void)setUserName:(NSString *)userName{
    _userName = [SEGUtils ValueToString:userName];
}

-(void)setUserType:(NSString *)userType{
    _userType = [SEGUtils ValueToString:userType];
}

-(void)setCreateTime:(NSString *)createTime{
  _createTime = [SEGUtils ValueToString:createTime];
}
-(void)setDiscussion:(NSString *)discussion{
   _discussion = [SEGUtils ValueToString:discussion];
}
@end

#pragma mark - ================<6.工单轨迹子模型 - 环节追记信息>===============
@implementation SEGOrderTaskComment
+ (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    return [[self alloc] initWithDictionary:dictionary];
}

- (void)setValue:(id)value forUndefinedKey:(NSString*)key
{//注意此方法
}

- (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    self = [super init];
    if (self) {
        _commentId = @"";
        _parId = @"";
        _userId = @"";
        _userName = @"";
        _createTime = @"";
        _discussion = @"";
        self.mDictionary = [[NSMutableDictionary alloc] initWithDictionary:dictionary];
        [self setValuesForKeysWithDictionary:dictionary];
        
    }
    return self;
}
-(void)setCommentId:(NSString *)commentId{
    _commentId = [SEGUtils ValueToString:commentId];
}
-(void)setUserName:(NSString *)userName{
    _userName = [SEGUtils ValueToString:userName];
}

-(void)setParId:(NSString *)parId{
    _parId = [SEGUtils ValueToString:parId];
}

-(void)setCreateTime:(NSString *)createTime{
    _createTime = [SEGUtils ValueToString:createTime];
}
-(void)setDiscussion:(NSString *)discussion{
    _discussion = [SEGUtils ValueToString:discussion];
}
@end

#pragma mark - ================<7.工单轨迹子模型 - 环节挂起信息>===============
@implementation SEGOrderTaskHangInfo
+ (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    return [[self alloc] initWithDictionary:dictionary];
}

- (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    self = [super init];
    if (self) {
        _hangtime = @"";
        _planrelievetime = @"";
        _userId = @"";
        _userName = @"";
        _hangremark = @"";
        _hangStatus = @"";
        _factRelieveHang = @"";
        _reviewAdvise = @"";
        self.mDictionary = [[NSMutableDictionary alloc] initWithDictionary:dictionary];
        [self setValuesForKeysWithDictionary:dictionary];
        
    }
    return self;
}
- (void)setValue:(id)value forUndefinedKey:(NSString*)key
{//注意此方法
}
-(void)setHangtime:(NSString *)hangtime{
    _hangtime= [SEGUtils ValueToString:hangtime];
}
-(void)setUserName:(NSString *)userName{
    _userName = [SEGUtils ValueToString:userName];
}

-(void)setPlanrelievetime:(NSString *)planrelievetime{
    _planrelievetime= [SEGUtils ValueToString:planrelievetime];
}

-(void)setHangremark:(NSString *)hangremark{
    _hangremark = [SEGUtils ValueToString:hangremark];
}
-(void)setHangStatus:(NSString *)hangStatus{
    _hangStatus = [SEGUtils ValueToString:hangStatus];
}

-(void)setFactRelieveHang:(NSString *)factRelieveHang{
    _factRelieveHang = [SEGUtils ValueToString:factRelieveHang];
}

-(void)setUserId:(NSString *)userId{
    _userId = [SEGUtils ValueToString:userId];
}

-(void)setReviewAdvise:(NSString *)reviewAdvise{
    _reviewAdvise = [SEGUtils ValueToString:reviewAdvise];
}
@end

#pragma mark - ================<8.工单轨迹子模型 - 环节转单信息>===============
@implementation SEGOrderTaskRotateInfo
+ (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    return [[self alloc] initWithDictionary:dictionary];
}

- (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    self = [super init];
    if (self) {
        _requserId = @"";
        _requserName = @"";
        _createDate= @"";
        _remark = @"";
        _taruserId = @"";
        self.mDictionary = [[NSMutableDictionary alloc] initWithDictionary:dictionary];
        [self setValuesForKeysWithDictionary:dictionary];
        
    }
    return self;
}
- (void)setValue:(id)value forUndefinedKey:(NSString*)key
{//注意此方法
}
-(void)setRequserId:(NSString *)requserId{
    _requserId = [SEGUtils ValueToString:requserId];
}

-(void)setRequserName:(NSString *)requserName{
    _requserName = [SEGUtils ValueToString:requserName];
}

-(void)setCreateDate:(NSString *)createDate{
   _createDate = [SEGUtils ValueToString:createDate];
}

-(void)setRemark:(NSString *)remark{
    _remark = [SEGUtils ValueToString:remark];
}

-(void)setTaruserId:(NSString *)taruserId{
    _taruserId = [SEGUtils ValueToString:taruserId];
}
@end

#pragma mark - ================<9.工单轨迹子模型 - 环节督办信息>===============
@implementation SEGOrderTaskSupInfo
+ (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    return [[self alloc] initWithDictionary:dictionary];
}

- (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    self = [super init];
    if (self) {
        _supuserId = @"";
        _supuserName = @"";
        _suptime = @"";
        _supremark = @"";
        _supflag = @"";
        _supretype = @"";
        _taruserId = @"";
        _taruserName = @"";
        self.mDictionary = [[NSMutableDictionary alloc] initWithDictionary:dictionary];
        [self setValuesForKeysWithDictionary:dictionary];
        
    }
    return self;
}
- (void)setValue:(id)value forUndefinedKey:(NSString*)key
{//注意此方法
}
-(void)setSupuserId:(NSString *)supuserId{
    _supuserId = [SEGUtils ValueToString:supuserId];
}

-(void)setSupuserName:(NSString *)supuserName{
    _supuserName = [SEGUtils ValueToString:supuserName];
}

-(void)setSuptime:(NSString *)suptime{
    _suptime = [SEGUtils ValueToString:suptime];
}

-(void)setSupremark:(NSString *)supremark{
    _supremark = [SEGUtils ValueToString:supremark];
}

-(void)setSupflag:(NSString *)supflag{
    _supflag = [SEGUtils ValueToString:supflag];
}

-(void)setSupretype:(NSString *)supretype{
   _supretype = [SEGUtils ValueToString:supretype];
}

-(void)setTaruserId:(NSString *)taruserId{
    _taruserId = [SEGUtils ValueToString:taruserId];
}

-(void)setTaruserName:(NSString *)taruserName{
    _taruserName = [SEGUtils ValueToString:taruserName];
}
@end

#pragma mark - ================<10.工单轨迹子模型 - 环节所有信息>===============
@implementation SEGOrderTasks
+ (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    return [[self alloc] initWithDictionary:dictionary];
}

- (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    self = [super init];
    if (self) {
        _handleDate = @"";
        _taskCode = @"";
        _taskName = @"";
        _supinfo = [[SEGOrderTaskSupInfo alloc] init];
        _rotateinfo = [[SEGOrderTaskRotateInfo alloc] init];
        _hanginfo = [[SEGOrderTaskHangInfo alloc] init];
        _comment = [[SEGOrderTaskComment alloc] init];
        _urgentinfo = [[SEGOrderTaskUrgentInfo alloc] init];
        self.mDictionary = [[NSMutableDictionary alloc] initWithDictionary:dictionary];
        [self setValuesForKeysWithDictionary:dictionary];
        
    }
    return self;
}
- (void)setValue:(id)value forUndefinedKey:(NSString*)key
{//注意此方法
}
-(void)setHandleDate:(NSString *)handleDate{
    _handleDate = [SEGUtils ValueToString:handleDate];
}

-(void)setTaskCode:(NSString *)taskCode{
    _taskCode = [SEGUtils ValueToString:taskCode];
}

-(void)setTaskName:(NSString *)taskName{
    _taskName = [SEGUtils ValueToString:taskName];
}

-(void)setValue:(id)value forKey:(NSString *)key
{
    if ([key isEqualToString:@"supinfo"] && [value isKindOfClass:[NSDictionary class]]) {
        SEGOrderTaskSupInfo *model = [SEGOrderTaskSupInfo initWithDictionary:value];
        _supinfo = model;
        return;
    }
    
    if ([key isEqualToString:@"rotateinfo"] && [value isKindOfClass:[NSDictionary class]]) {
        SEGOrderTaskRotateInfo *model = [SEGOrderTaskRotateInfo initWithDictionary:value];
        _rotateinfo = model;
        return;
    }
    
    if ([key isEqualToString:@"hanginfo"] && [value isKindOfClass:[NSDictionary class]]) {
        SEGOrderTaskHangInfo *model = [SEGOrderTaskHangInfo initWithDictionary:value];
        _hanginfo = model;
        return;
    }
    
    if ([key isEqualToString:@"comment"] && [value isKindOfClass:[NSDictionary class]]) {
        SEGOrderTaskComment *model = [SEGOrderTaskComment initWithDictionary:value];
        _comment = model;
        return;
    }
    
    if ([key isEqualToString:@"urgentinfo"] && [value isKindOfClass:[NSDictionary class]]) {
        SEGOrderTaskUrgentInfo *model = [SEGOrderTaskUrgentInfo initWithDictionary:value];
        _urgentinfo = model;
        return;
    }
    
    [super setValue:value forKey:key];
}

@end
